package ru.arriah.common.web;

import javax.servlet.*;

public abstract class GenericFilter implements Filter {
   protected FilterConfig filterConfig;

   public GenericFilter() {
      super();
      filterConfig = null;
   }

   public void destroy() {
   }

   public void init(FilterConfig filterConfig) throws ServletException {
      this.filterConfig = filterConfig;
   }

   protected void handleException(Exception e, String methodName) {
      System.out.println(
         this.getClass().getName() + "." + methodName + " caused " +
         e.getClass().getName() + ": " + e.getMessage()
      );

      e.printStackTrace();
   }
}
